package org.fve.user;

import org.eclipse.jetty.websocket.WebSocket.Connection;
import org.fve.rtp.RTPText;
import org.fve.sip.SipInvite;
import org.fve.sip.SipRegister;

import fve.Utils_;

public class User {
	private String name;
	private int port;
	private String passw;
	private String SipState;
	private Connection connection;
	private String idsesion;
	private String SipUser;
	private String IPUser;
	private RTPText rtptext;
	private SipRegister Register = null;	
	private SipInvite Invite = null;	

	public User(String name, int port, String passw, String SipState,
			Connection connection, String idsesion, String SipUser, String IPUser) {
		this.name = name;
		this.port = port;
		this.passw = passw;
		this.SipState = SipState;
		this.connection = connection;
		this.idsesion = idsesion;
		this.SipUser = SipUser;
		this.IPUser = IPUser;
	}

	// GETS
	public String getName() {
		return name;
	}

	public String getPassw() {
		return passw;
	}

	public String getSipState() {
		return SipState;
	}

	public int getPort() {
		return port;
	}

	public String getIdSesion() {
		return idsesion;
	}

	public Connection getConnection() {
		return connection;
	}
	public String getSipUser() {
		return SipUser;
	}
	public String getIPUser() {
		return IPUser;
	}
	public RTPText GetRTPtext(){
		return this.rtptext;
	}
	public SipRegister GetSipRegister(){
		return this.Register;
	}
	public SipInvite GetSipInvite(){
		return this.Invite;
	}

	// SETS
	public void setName(String name) {
		this.name = name;
	}

	public void setPassw(String passw) {
		this.passw = passw;
	}

	public void setSipState(String SipState) {
		this.SipState = SipState;
	}

	public void setPort(int port) {
		this.port = port;
	}

	public void setIdSesion(String idsesion) {
		this.idsesion = idsesion;
	}

	public void setConnection(Connection connection) {
		this.connection = connection;
	}
	public void setSipUser(String SipUser) {
		this.SipUser = SipUser;
	}

	public void setIPUser(String IPUser) {
		this.IPUser = IPUser;
	}
	public void SetRTP( String remoteUserIP, int to_port){
		this.rtptext = new RTPText(this.IPUser, remoteUserIP, to_port, Utils_.PORT_SIPARETOR);
	}
	public void setSipRegister(SipRegister Register){
		this.Register = Register;
	}
	public void setSipInvite(SipInvite Invite){
		this.Invite = Invite;
	}
}
